/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.lance.other;

import za.ac.lance.other.Account;

/**
 *
 * @author Lance
 */
public class CurrentAccount implements Account
{

    private int balance;
    private int period;

    public CurrentAccount(int balance, int period)
    {
        this.balance = balance;
        this.period = period;
    }

    public boolean openAccount(int balance)
    {
        this.balance = balance;
        return true;
    }

    @Override
    public boolean closeAccount()
    {
        if (balance > 0)
        {
            return true;
        }
        else
        {
            return false;
        }
    }

    public int getBalance()
    {
        return balance;
    }

    public void setBalance(int balance)
    {
        this.balance = balance;
    }

    public int getPeriod()
    {
        return period;
    }

    public void setPeriod(int period)
    {
        this.period = period;
    }
}
